package com.tiancheng.trade.order.vo.api;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Getter;
import lombok.Setter;

import java.time.LocalDateTime;

@Getter
@Setter
public class CreditOrderVo {

    /**
     * 主订单号
     */
    private String orderId;
    /**
     * 用户id
     */
    private String uid;
    /**
     * 支付宝授权订单id
     */
    private String alipayAuthNo;
    /**
     * 平台业务订单id
     */
    private String platformOrderId;
    /**
     * 预授权订单状态
     */
    private String orderState;
    /**
     * 预授权总金额
     */
    private Integer totalAmount;
    /**
     * 订单累计冻结金额
     */
    private Integer totalFreezeAmount;
    /**
     * 订单累计冻结信用金额
     */
    private Integer totalFreezeCreditAmount;
    /**
     * 订单累计冻结资金金额
     */
    private Integer totalFreezeFundAmount;
    /**
     * 订单累计用于支付金额
     */
    private Integer totalPayAmount;
    /**
     * 订单累计剩余金额
     */
    private Integer restAmount;

    /**
     * 资金预授权状态
     */
    private String authStatus;
    /**
     * 商品名称
     */
    private String productName;
    /**
     * 履约状态 0违约1履约
     */
    private Integer contractState;
    /**
     * 信用授权类型 CREDIT全信用 MIXED信用+ 资金 FUND全资金
     */
    private String creditAuthType;
    /**
     * 资金预授权成功时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime preAuthTime;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    protected LocalDateTime lastUpdDt;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    protected LocalDateTime createdDt;
    /**
     * 描述
     */
    private String description;
    /**
     * 业务附加字段
     */
    private String extendFields;
    /**
     * 商户id
     */
    private String merchantId;

}
